package model.tobj;

import java.util.HashMap;
import java.util.Map;

import model.collect.pedEvent;

public class pedAndPhase {

	public String getPhasedevid() {
		return phasedevid;
	}
	public void setPhasedevid(String phasedevid) {
		this.phasedevid = phasedevid;
	}
	public String getPedDevid() {
		return pedDevid;
	}
	public void setPedDevid(String pedDevid) {
		this.pedDevid = pedDevid;
	}
	public Map<String, pedEvent> getPedEventdata() {
		return pedEventdata;
	}
	public void setPedEventdata(Map<String, pedEvent> pedEventdata) {
		this.pedEventdata = pedEventdata;
	}
	public pedAndPhase(String phasedevid, String pedDevid,String passPhase) {
		super();
		this.phasedevid = phasedevid;
		this.pedDevid = pedDevid;
		this.passPhase=passPhase.split(";");
	}
	public pedAndPhase() {
		// TODO Auto-generated constructor stub
	}
	
	public void setPassPhase(String[] passPhase) {
		this.passPhase = passPhase;
	}
	public String[] getPassPhase() {
		return passPhase;
	}

	private String phasedevid;
	private String pedDevid;
	Map<String, pedEvent> pedEventdata= new HashMap<String, pedEvent>();
	private String[] passPhase;
	//每个交叉口都对应一个红绿灯，对应一个通信相位，对应一个行人过街检测设备
	
	public boolean isContain(String p){
		boolean ret=false;
		for (int i=0;i<this.passPhase.length;i++){
			if (passPhase[i].equals(p)){
				ret=true;
				break;
			}
		}
		return ret;
	}
}
